package com.gg.hj.controller;

import com.gg.common.pojo.SCell;
import com.gg.hj.search.S_CellSearch;
import com.gg.hj.service.S_CellService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class S_CellController {
    @Resource
    private S_CellService cellService;

    //TODO 配置安全库存
    @ResponseBody
    @RequestMapping("/constituteSCell.action")
    public int constituteSCell(@RequestBody SCell sCell) throws Exception {
        return this.cellService.constituteSCellService(sCell);
    }
    //TODO 查询复核安全库存单
    @ResponseBody
    @RequestMapping("/queryInventoryReviewAll.action")
    public S_CellSearch<SCell> queryInventoryReviewAll(@RequestBody S_CellSearch<SCell> cellSearch) throws Exception {
        return this.cellService.queryInventoryReviewAllService(cellSearch);
    }
    //TODO 复核 变更 安全库存单
    @ResponseBody
    @RequestMapping("/constituteUpdateSCellCheck.action")
    public int constituteUpdateSCellCheck(@RequestBody SCell cell) throws Exception {
        return this.cellService.constituteUpdateSCellCheckService(cell);
    }
    //TODO 安全库存配置单查询
    @ResponseBody
    @RequestMapping("/querySCellAll.action")
    public S_CellSearch<SCell> querySCellAll(@RequestBody S_CellSearch<SCell> cellSearch) throws Exception {
        return this.cellService.queryAllService(cellSearch);
    }
    //TODO 查询安全库存配置变更单
    @ResponseBody
    @RequestMapping("/searchQueryCheckTag.action")
    public S_CellSearch<SCell> searchQueryCheckTag(@RequestBody S_CellSearch<SCell> search) throws Exception {
        return this.cellService.searchQueryCheckTagService(search);
    }
}
